package com.rc.saas.tenant.service.acct;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.mapper.acct.TenantOperatorAccountRecordMapper;
import com.rc.saas.tenant.search.tenant.TenantOperatorAccountRecordSearch;
import com.rc.saas.tenant.vo.acct.TenantOperatorAccountRecordResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/1/29
 */
@Service
public class TenantOperatorAccountRecordServiceImpl implements TenantOperatorAccountRecordService {

    @Autowired
    private TenantOperatorAccountRecordMapper tenantOperatorAccountRecordMapper;

    @Override
    public TenantOperatorAccountRecordMapper getMapper() {
        return tenantOperatorAccountRecordMapper;
    }

    @Override
    public PageInfo<TenantOperatorAccountRecordResultVo> listPageTenantOperatorAccountRecord(TenantOperatorAccountRecordSearch acctBankSearch) {
        PageHelper.startPage(acctBankSearch.getOffset(), acctBankSearch.getLimit());
        List<TenantOperatorAccountRecordResultVo> list = tenantOperatorAccountRecordMapper.listPageTenantOperatorAccountRecord(acctBankSearch);
        return new PageInfo<TenantOperatorAccountRecordResultVo>(list);
    }

    @Override
    public List<TenantOperatorAccountRecordResultVo> exportTenantOperatorAccountRecord(TenantOperatorAccountRecordSearch acctBillOrderSearch) {
        return tenantOperatorAccountRecordMapper.listPageTenantOperatorAccountRecord(acctBillOrderSearch);
    }
}
